# shell

if [[ -n "$1" ]] ; then
	PROJECT_NAME=$1
else
	PROJECT_NAME="ait_koa"
fi

cd /usr/local/project/$PROJECT_NAME
git reset --hard origin/master
git clean -f
git pull
npm install
pm2 restart $PROJECT_NAME
# git checkout $BRANCH

# forever stop index.js
# NODE_ENV=production forever start index.js
echo "#-----------------------------------------------#"
echo "#              Execution Completed              #"
echo "#-----------------------------------------------#"